package org.afs.gescol.core.model.references;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.scub.foundation.framework.core.model.BaseModel;

/**
 * Reference model for school period.
 * @autor Kobla GBENYO (kobla.gbenyo@gmail.com)
 */
@Entity
@Table(name = "ref_period")
@AttributeOverrides({@AttributeOverride(name = "id", column = @Column(name = "period_id", nullable = false)),
    @AttributeOverride(name = "version", column = @Column(name = "period_version", nullable = false, unique = false)),
})
public class Period extends BaseModel {

    /** Serial Version UID. */
    private static final long serialVersionUID = 5209081546273915515L;

    /** School Period label. */
    @Column(name = "period_label")
    private String label;

    @Column(name = "period_order")
    private int order;

    /**
     * Get the value of label.
     * @return the label
     */
    public String getLabel() {
        return label;
    }

    /**
     * Set the value of label.
     * @param label the label to set
     */
    public void setLabel(String label) {
        this.label = label;
    }

    /**
     * Get the value of order.
     * @return the order
     */
    public int getOrder() {
        return order;
    }

    /**
     * Set the value of order.
     * @param order the order to set
     */
    public void setOrder(int order) {
        this.order = order;
    }

    @Override
    public boolean equals(Object other) {
        return equalsUtil(other);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

}
